import java.util.Scanner;
public class testdemo1 {
    public static void main1(String[] args) {
        System.out.println("请输入想要判断的数字");
        Scanner scan=new Scanner(System.in);
        int a=scan.nextInt();
        int i=2;
        for(;i<=Math.sqrt(a);i++)
        {
            if(a%i==0) {
                System.out.println(a + "不是素数");
                break;
            }

        }
        if(a%i!=0)
        {
            System.out.println(a+"是素数");
        }
    }

    public static void main2(String[] args) {
        for(int i=1;i<=100;i++){
            for(int j=2;j<=i;j++){
                if(i%j==0&&i!=j) {
                    break;
                }
                if(i==j)
                {
                    System.out.println(i);
                }
            }
        }
    }

    public static void main3(String[] args) {
        for(int i=1000;i<=2000;i++){
            if(i%4==0&&i%100!=0||i%400==0){
                System.out.println(i);
            }
        }
    }


    public static void main4(String[] args) {
        int count=0;
        for(int i=1;i<=100;i++){
            if(i%10==9){
                count++;
            }
            if(i/10==9&&i%10!=9){
                count++;
            }
            if(i/10==9&&i%10==9){
                count++;
            }
        }
        System.out.println(count);
    }

    public static void main5(String[] args) {
        Scanner alt=new Scanner(System.in);
        System.out.println("请输入数字以产生相应乘法表");
        int a= alt.nextInt();
        for(int i=1;i<=a;i++){
            for(int j=1;j<=i;j++){
                System.out.printf("%d*%d=%d ",j,i,j*i);

            }
            System.out.println();
        }
    }


    public static void main6(String[] args) {
        Scanner scan1=new Scanner(System.in);
        System.out.println("请输入一个整数");
        int a=scan1.nextInt();
        while(a/10!=0){

            System.out.print(a%10+" ");
            a/=10;
            if(a<=9){
                System.out.print(a+" ");
            }
        }
    }

    public static void main7(String[] args) {
        Scanner scan2=new Scanner(System.in);
        String a="hello";
        int i=1;
        for(;i<=3;i++){
            System.out.println("请输入密码");
            String b= scan2.nextLine();
            if(a.equals(b)){
                System.out.println("登陆成功");
                break;
            }
            else{
                System.out.println("密码错误，请重新输入");
            }
        }
        if(i==4){
            System.out.println("即将退出程序");
        }
    }

    public static void main(String[] args) {
        Scanner scan3=new Scanner(System.in);
        System.out.println("请输入一个整数");
        int a=scan3.nextInt();
        System.out.println("奇数位二进制序列如下");
        for(int i=30;i>=0;i-=2){
            int n=1&(a>>i);
            System.out.print(n);
        }
        System.out.println("");
        System.out.println("偶数位二进制序列如下");
        for(int j=31;j>=1;j-=2){
            int m=1&(a>>j);
            System.out.print(m);
        }
    }
}
